import request from '@/utils/request'

// 查询存储销售记录的列表
export function listSales(query) {
    return request({
        url: '/sale/sale/list',
        method: 'get',
        params: query
    })
}

// 查询存储销售记录的详细
export function getSales(orderId) {
    return request({
        url: '/sale/sale/' + orderId,
        method: 'get'
    })
}

// 新增存储销售记录的
export function addSales(data) {
    return request({
        url: '/sale/sale',
        method: 'post',
        data: data
    })
}

// 修改存储销售记录的
export function updateSales(data) {
    return request({
        url: '/sale/sale',
        method: 'put',
        data: data
    })
}

// 删除存储销售记录的
export function delSales(orderId) {
    return request({
        url: '/sale/sale/' + orderId,
        method: 'delete'
    })
}
